/**********************************************************
 * Class WSE
 ************************/
(function(){

    //
    var WSE = window.WSE = function( subject )
    {
        // 注册(观察者)
        if( subject ){
            subject.attach(this);
        }

        // 命令对象
        this.cmdSpid = new CmdBuilder( "wse","spider","null");

        // 功能模块对象
        //this.spider = new Spider("execute.aspx","wse","spider","cat");
    }

    //
    WSE.fn = WSE.prototype =
    {
        listening : function( cmd )
        {
            if(cmd.subsys != this.cmdSpid.subsys ){  return false;    }

            var dispArea = WSE.ui.init();
            dispArea.content.append("<h1>Wse</h1>");

            //this.spider.listening();
        }
    };

    // Ui
    WSE.ui = {
        topToolbar: "",
        content: "",
        bottomToolbar: "",

        init : function(){
            this.topToolbar = App.ui.toolbarWrap.clone(true);
            this.content = App.ui.contentWrap.clone(true);
            this.bottomToolbar =this.topToolbar.clone(true);

            App.ui.content.empty()             //主显示区域
                  .append(this.topToolbar)     //工具显示区域
                  .append(this.content)        //内容显示区域
                  .append(this.bottomToolbar);

            this.topToolbar.append(App.ui.btnReturn.clone(true));       //填充顶部工具
            this.bottomToolbar.append(App.ui.btnReturn.clone(true));    //填充底部工具条

            return this;
        }
    };

})();
